<?php
/**
 * Created by PhpStorm.
 * User: figo-009
 * Date: 2017/5/17
 * Time: 17:00
 */
namespace ApigilityGroup\DoctrineEntity;

use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\Table;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\OneToOne;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\JoinTable;
use Doctrine\ORM\Mapping\GeneratedValue;
use Doctrine\ORM\Mapping\ManyToOne;
use Doctrine\ORM\Mapping\ManyToMany;
use Doctrine\ORM\Mapping\OneToMany;
use Doctrine\Common\Collections\ArrayCollection;

/**
 * Class Setting
 * @package ApigilityGroup\DoctrineEntity
 * @Entity @Table(name="apigilitygroup_setting")
 */
class Setting
{
    /**
     * @Id @Column(type="integer")
     * @GeneratedValue
     */
    protected $id;

    /**
     * 男免费数
     *
     * @Column(type="integer", nullable=false)
     */
    protected $male_free_nums;

    /**
     * 男剩余免费名额
     *
     * @Column(type="integer", nullable=false)
     */
    protected $male_free_left_nums;

    /**
     * 女免费数
     *
     * @Column(type="integer",nullable=false)
     */
    protected $female_free_nums;

    /**
     * 女剩余免费名额
     *
     * @Column(type="integer",nullable=false)
     */
    protected $female_free_left_nums;

    /**
     * 成团人数
     *
     * @Column(type="integer", nullable=false)
     */
    protected $being_group_nums;

    /**
     * 团购价格
     *
     * @Column(type="float", nullable=true)
     */
    protected $price;

    /**
     * 创建时间
     *
     * @Column(type="datetime", nullable=false)
     */
    protected $creatime;

    /**
     * 拼团活动名称
     *
     * @Column(type="string", length=128, nullable=true)
     */
    protected $name;

    /**
     * 省
     *
     * @ManyToOne(targetEntity="ApigilityAddress\DoctrineEntity\Region")
     * @JoinColumn(name="province_region_id", referencedColumnName="id")
     */
    protected $province;

    /**
     * 市
     *
     * @ManyToOne(targetEntity="ApigilityAddress\DoctrineEntity\Region")
     * @JoinColumn(name="city_region_id", referencedColumnName="id")
     */
    protected $city;

    /**
     * 区
     *
     * @ManyToOne(targetEntity="ApigilityAddress\DoctrineEntity\Region")
     * @JoinColumn(name="district_region_id", referencedColumnName="id")
     */
    protected $district;

    public function __construct()
    {
        $this->province = new ArrayCollection();
        $this->city = new ArrayCollection();
        $this->district = new ArrayCollection();
    }

    public function getId()
    {
        return $this->id;
    }

    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    public function getMaleFreeNums()
    {
        return $this->male_free_nums;
    }

    public function setMaleFreeNums($male_free_nums)
    {
        $this->male_free_nums = $male_free_nums;
        return $this;
    }

    public function getFemaleFreeNums()
    {
        return $this->female_free_nums;
    }

    public function setFemaleFreeNums($female_free_nums)
    {
        $this->female_free_nums = $female_free_nums;
        return $this;
    }

    public function getBeingGroupNums()
    {
        return $this->being_group_nums;
    }

    public function setBeingGroupNums($being_group_nums)
    {
        $this->being_group_nums = $being_group_nums;
        return $this;
    }

    public function getPrice()
    {
        return $this->price;
    }

    public function setPrice($price)
    {
        $this->price = $price;
        return $this;
    }

    public function getProvince()
    {
        return $this->province;
    }

    public function setProvince($province)
    {
        $this->province = $province;
        return $this;
    }

    public function getCity()
    {
        return $this->city;
    }

    public function setCity($city)
    {
        $this->city = $city;
        return $this;
    }

    public function getDistrict()
    {
        return $this->district;
    }

    public function setDistrict($district)
    {
        $this->district = $district;
        return $this;
    }

    public function getCreatime()
    {
        return $this->creatime;
    }

    public function setCreatime($creatime)
    {
        $this->creatime = $creatime;
    }

    public function getName()
    {
        return $this->name;
    }

    public function setName($name)
    {
        $this->name = $name;
    }

    public function getMaleFreeLeftNums()
    {
        return $this->male_free_left_nums;
    }

    public function setMaleFreeLeftNums($male_free_left_nums)
    {
        $this->male_free_left_nums = $male_free_left_nums;
    }

    public function getFemaleFreeLeftNums()
    {
        return $this->female_free_left_nums;
    }

    public function setFemaleFreeLeftNums($female_free_left_nums)
    {
        $this->female_free_left_nums = $female_free_left_nums;
    }

}